package com.xnfh.common.service

import android.content.Context
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.Observer
import com.alibaba.android.arouter.facade.template.IProvider

/**
 * @Description:
 * @Author: ziheng
 * @CreateDate: 2023/11/8 10:00
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/11/8 10:00
 * @UpdateRemark: 更新说明
 */
interface ILoginService : IProvider {
    /**
     * 是否登录
     * @return Boolean
     */
    fun isLogin(): Boolean

    /**
     * 跳转登录页
     * @param context
     */
    fun login(context: Context)

    /**
     * 跳转隐私协议
     * @param context
     */
    fun readPolicy(context: Context)

    /**
     * 登出
     * @param context
     * @param lifecycleOwner
     * @param observer
     */
    fun logout(
        context: Context,
        lifecycleOwner: LifecycleOwner?,
        observer: Observer<Boolean>
    )

}